using NHibernate;
using NHibernate.Cfg;

namespace Rubikev.NHibernate
{
   /// <summary>
   /// Creates the NHibernate session factory
   /// </summary>
   public class SessionFactoryFactory
   {
      /// <summary>
      /// Creates the NHibernate session factory using a config file
      /// </summary>
      /// <returns>The created session factory</returns>
      public static ISessionFactory CreateSessionFactory()
      {
         Configuration configuration = new Configuration();
         configuration.Configure();
         return configuration.BuildSessionFactory();
      }
   }
}